export default [
  {
    path: '/user',
    layout: false,
    routes: [
      {
        name: '登录',
        path: '/user/login',
        component: './user/Login',
      },
      {
        component: './404',
      },
    ],
  },
  {
    path: '/welcome',
    name: '欢迎',
    icon: 'smile',
    component: './Welcome',
  },
  {
    path: '/admin',
    name: '管理页',
    icon: 'crown',
    // access: 'canAdmin',
    component: './Admin',
    routes: [
      {
        name: '用户管理',
        icon: 'smile',
        path: '/admin/user-manage',
        component: './Admin/UserManage',
      },
      {
        name: '肥料管理',
        icon: 'smile',
        path: '/admin/fertilizer',
        component: './Admin/Fertilizer',
      },
      {
        name: '农药管理',
        icon: 'smile',
        path: '/admin/pesticide',
        component: './Admin/Pesticide',
      },
      {
        name: '果蔬管理',
        icon: 'smile',
        path: '/admin/vegetable',
        component: './Admin/Vegetable',
      },
      {
        name: '果蔬种类管理',
        icon: 'smile',
        path: '/admin/vegetable_type',
        component: './Admin/VegetableType',
      },
      {
        name: '果蔬种植信息',
        icon: 'smile',
        path: '/admin/vegetable_info',
        component: './Admin/VegetableInfo',
      },
      {
        name: '环境监测数据',
        icon: 'smile',
        path: '/admin/env_monitoring',
        component: './Admin/EnvMonitoring',
      },
      {
        name: '种植地点',
        icon: 'smile',
        path: '/admin/planting_location',
        component: './Admin/PlantingLocation',
      },
      {
        name: '种植户信息',
        icon: 'smile',
        path: '/admin/grower_info',
        component: './Admin/GrowerInfo',
      },
      {
        component: './404',
      },
    ],
  },
  {
    path: '/',
    redirect: '/welcome',
  },
  {
    component: './404',
  },
];
